package br.com.ava.core.pessoa;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "pessoa_juridica")
@PrimaryKeyJoinColumn(name = "idpessoa")
@SuppressWarnings("serial")
public class PessoaJuridica extends Pessoa {

	private String razaoSocial;
	private String cnpj;

	public PessoaJuridica() {

	}

	public PessoaJuridica(String nome, String telefone, String email,
			String endereco, String razaoSocial, String cnpj) {
		super(nome, telefone, email, endereco);
		this.razaoSocial = razaoSocial;
		this.cnpj = cnpj;
	}

	@NotNull
	@Size(max = 255)
	@Column(name = "razao_social", nullable = false)
	public String getRazaoSocial() {
		return razaoSocial;
	}

	public void setRazaoSocial(String razaoSocial) {
		this.razaoSocial = razaoSocial;
	}

	@NotNull
	@Size(max = 20)
	@Column(name = "cnpj", nullable = false)
	public String getCnpj() {
		return cnpj;
	}

	public void setCnpj(String cnpj) {
		this.cnpj = cnpj;
	}

}
